import com.ymm.websocket.demo.WebSocketApplication;
import com.ymm.websocket.demo.rpc.DriverRPC;
import com.ymm.websocket.demo.rpc.ShipperRPC;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.sql.Driver;

/**
 * @Description: TODO
 * @Author: Xuecheng Li
 * @CreateTime: 2022-08-18 13:34
 * @Version: 1.0.0
 */
@SpringBootTest(classes = WebSocketApplication.class,
        webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
public class test {

    @Resource
    DriverRPC driverRPC;

    @Resource
    ShipperRPC shipperRPC;

    @Test
    public void testDriverRPC() {
        System.out.println(driverRPC.getDriverInfoById(1L));
    }

    @Test
    public void testShipperRPC() {
        System.out.println(shipperRPC.getShipperInfo(1L));
    }
}
